package com.backstage.common.base.bean;

import com.backstage.common.base.enum_bean.MessageEnumStatus;
import com.backstage.common.base.enum_bean.MessageEnumTitle;

import java.util.Map;

/**
<b>版本编号：version1.0</b>
<b>功能：返回消息</b>
<b>作者：阮雪峰</b>
<b>日期：2017年2月25日</b>
<b>更新者：DELL</b>
<b>更新时间：2017年2月25日 下午3:24:49</b>
<b>文件名称：Message</b>
<b>包名称：com.jryun.mhexpress.common.base.bean</b>
<b>项目名称：mhexpress-jryun-service</b>
<b></b>
 */
public class Message {
	public final static Message LOGIN_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "登录成功");
	public final static Message ADD_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "添加成功");
	public final static Message EDIT_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "修改成功");
	public final static Message DELETE_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "删除成功");
	public final static Message OPERATE_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "操作成功");
	public final static Message LOGOUT_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "已注销");
	public final static Message LOCKSCREEN_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "锁屏成功");
	public final static Message UNLOCKSCREEN_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "解锁成功");
	public final static Message VALIDATE_SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功, "成功");
	public final static Message SUCCESS = new Message(MessageEnumStatus.SUCCESS, MessageEnumTitle.成功);
	public final static Message FAIL = new Message(MessageEnumStatus.FAIL, MessageEnumTitle.失败);

	public final static Message SYSTEM_ERROR = new Message(MessageEnumStatus.FAIL, MessageEnumTitle.系统异常);
	public final static Message PASSWORD_ERROR = new Message(MessageEnumStatus.FAIL, MessageEnumTitle.系统异常, "密码不正确");

	//状态
	private MessageEnumStatus status;
	//消息标题
	private MessageEnumTitle title;
	//返回消息
	private String message;

	private Map<String, Object> message_map;
	
	public Message(MessageEnumStatus status,MessageEnumTitle title, String message ){
		this.status = status;
		this.title = title;
		this.message = message;
	}

	public Message(MessageEnumStatus status,MessageEnumTitle title){
		this.status = status;
		this.title = title;
	}

	public Map<String, Object> getMessage_map() {
		return message_map;
	}

	public Message setMessage_map(Map<String, Object> message_map) {
		this.message_map = message_map;
		return this;
	}

	public MessageEnumStatus getStatus() {
		return status;
	}

	public void setStatus(MessageEnumStatus status) {
		this.status = status;
	}

	public MessageEnumTitle getTitle() {
		return title;
	}

	public void setTitle(MessageEnumTitle title) {
		this.title = title;
	}

	public String getMessage() {
		return message;
	}

	public Message setMessage(String message) {
		this.message = message;
		return this;
	}
	
}
